package umlTool;

import org.w3c.dom.Document;
import org.w3c.dom.Element;

/**
 * represent a relation (incomplete)
 * 
 * @author Mimo
 *
 */
public class relationDiagram implements ISaveable {
	ClassDiagram from, to;
	String relationType;
	String type;

	void setFrom(ClassDiagram from) {
		this.from = from;
	}

	void setTo(ClassDiagram to) {
		this.to = to;
	}

	@Override
	public Element saveToXml(Document d) {
		Element elem = d.createElement("classRelation");
		elem.setAttribute("from", from.getName());
		elem.setAttribute("to", to.getName());
		return elem;
	}
}
